package presentationTier.actions;

import core.MovieException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import presentationTier.MainForm;
import presentationTier.dialogs.AddMovieDialog;

/**
 *
 * @author vojta
 */
public class AddMovieAction implements ActionListener{

    MainForm form;

    public AddMovieAction(MainForm aThis) {
        form = aThis;
    }

    public void actionPerformed(ActionEvent e) {
        try {
            AddMovieDialog d = new AddMovieDialog(form, true);
            d.setVisible(true);
        } catch (MovieException ex) {
            form.error(ex);
        }
    }

}
